<div id="commentwrap" class="clearfloat">
	<?php // Do not delete these lines
	if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
		die ('Please do not load this page directly. Thanks!');
	if (!empty($post->post_password)) { // if there's a password
		if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie
			?>
			<p class="nocomments"><?php _e('This post is password protected. Enter the password to view comments', 'paranimage') ?>.</p>
			<?php
			return;
		}
	}
	?>
	
	<?php if ( have_comments() ) : ?>
		<?php if ( ! empty($comments_by_type['comment']) ) : ?>
        <h3 id="comments"><?php comments_number( __('No responses', 'paranimage'), __('One responss', 'paranimage'), __('% responses', 'paranimage'));?></h3>
		<ul class="commentlist">
			<?php wp_list_comments('callback=custom_comment&type=comment'); ?>
		</ul>
        <div class="navigation" id="commentnav">
			<div class="nav-prev"><?php previous_comments_link() ?></div>
			<div class="nav-next"><?php next_comments_link() ?></div>
        </div>
		<?php endif; ?>
		
		<?php if ( ! empty($comments_by_type['pings']) ) : ?>
		<h3 id="pings"><?php _e('Trackbacks', 'paranimage') ?></h3>
		<ul class="pinglist">
		   <?php wp_list_comments('callback=custom_pings&type=pings'); ?>
		</ul>
		<div class="navigation" id="commentnav"> 
			<div class="alignleft"><?php previous_comments_link() ?></div>
			<div class="alignright"><?php next_comments_link() ?></div>
		</div>
		<?php endif; ?>
	<?php else : ?>
		<?php if ( comments_open() ) : ?>
		<?php else : // comments are closed ?>
		<p class="nocomments">Comments are closed.</p>
		<?php endif; ?>
	<?php endif; // End have_comments ?>
	
	<?php if ( comments_open() ) : ?>
	<div id="respond">
		<h3><?php comment_form_title( __('Leave a Reply','paranimage'), __('Leave a Reply to %s','paranimage' )); ?></h3>
		<?php cancel_comment_reply_link( __('Cancel reply', 'paranimage')) ?>
		<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
			<p><?php _e('You must be', 'paranimage'); ?> <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>"><?php _e('logged in', 'paranimage'); ?></a> <?php _e('to post a comment', 'paranimage'); ?>.</p>
			<?php else : ?>
			<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
				<?php if ( $user_ID ) : ?>
				<p><?php _e('Logged in as', 'paranimage'); ?> <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="<?php _e('Log out', 'paranimage'); ?>"><?php _e('Log out', 'paranimage'); ?> &raquo;</a></p>
				<?php else : ?>
				<p id="comment-notes"><?php _e('Your email is never shared', 'paranimage' ) ?>.<br />
				<?php if ($req) _e('Required fields are marked <span class="required">*</span>', 'paranimage' ) ?></p>     
				<p><label for="author"><?php _e('Name', 'paranimage' ) ?> <?php if ($req) echo '*'; ?></label><br /><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" class="text<?php if ($req) echo ' required'; ?>" /></p>
				<p><label for="email"><?php _e('Email', 'paranimage' ) ?> <?php if ($req) echo '*'; ?></label><br />
					<input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" class="text<?php if ($req) echo ' required'; ?>" /></p>
				<p><label for="url"><?php _e('Website', 'paranimage' ) ?></label><br /><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" /></p>
				<?php endif; ?>
				<?php comment_id_fields(); ?>
				<input type="hidden" name="redirect_to" value="<?php echo htmlspecialchars($_SERVER["REQUEST_URI"]); ?>" />
				<p><textarea name="comment" id="comment" cols="50" rows="10" tabindex="4"></textarea></p>
				<p><input name="submit" type="submit" id="submit" tabindex="5" value="<?php _e('Send', 'paranimage') ?>" />
				<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /></p>
				<?php do_action('comment_form', $post->ID); ?>
			</form>
		<?php endif; // If registration required and not logged in ?>
	</div><!-- end #respond -->
	<?php endif; // if you delete this the sky will fall on your head ?>
</div><!-- end #comments-wrapper -->